﻿<WinButton Text="按钮一" OnClick="@ClickButtonShowText"></WinButton>
<WinButton Text="按钮二" OnClick="@ClickButtonShowText"></WinButton>
<div>@ButtonText</div>

@code {
    private string ButtonText { get; set; } = "";

    private Task ClickButtonShowText(string text)
    {
        ButtonText = text;
        StateHasChanged();
        return Task.CompletedTask;
    }
}